interface SkuImageModel {
  id: number;
  skuId: number;
  imgName: string;
  imgUrl: string;
  isDefault: string;
}

// 难度1: 请完整定义以下数据
//1. const skuImage: SkuImageModel = ???

const skuImage: SkuImageModel = {
  id: 111,
  skuId: 222,
  imgName: "爱图",
  imgUrl: "http://www.baidu.com",
  isDefault: "atguigu.com",
};

type SkuImageListModel = SkuImageModel[];
// 难度1: 请完整定义以下数据
//2. const skuImageList: SkuImageListModel = ???

const SkuImageList: SkuImageListModel = [
  {
    id: 111,
    skuId: 222,
    imgName: "爱图",
    imgUrl: "http://www.baidu.com",
    isDefault: "atguigu.com",
  },
];



interface SkuAttrValueModel {
  id: number;
  attrId: number;
  valueId: number;
  skuId: number;
  attrName: string;
  valueName: string;
}
// 难度1: 请完整定义以下数据
//3. const skuAttrValue: SkuAttrValueModel = ???

const skuAttrValue: SkuAttrValueModel = {
  id: 1,
  attrId: 2,
  valueId: 3,
  skuId: 4,
  attrName: "55",
  valueName: "66",
};

type SkuAttrValueListModel = SkuAttrValueModel[];

//4. const skuAttrValueList: SkuAttrValueListModel = ???

const skuAttrValueList: SkuAttrValueListModel = [
  {
    id: 1,
    attrId: 2,
    valueId: 3,
    skuId: 4,
    attrName: "55",
    valueName: "66",
  },
];




interface SkuSaleAttrValueModel {
  id: number;
  saleAttrId: number;
  saleAttrName: string;
  saleAttrValueId: number;
  saleAttrValueName: string;
  skuId: number;
  spuId: number;
}

// 难度1: 请完整定义以下数据
//5. const skuSaleAttrValue: SkuSaleAttrValueModel = ???
const skuSaleAttrValue: SkuSaleAttrValueModel = {
  id: 22,
  saleAttrId: 33,
  saleAttrName: 'string',
  saleAttrValueId: 44,
  saleAttrValueName: 'string',
  skuId: 55,
  spuId: 66,
}



type SkuSaleAttrValueListModel = SkuSaleAttrValueModel[];

//5. const skuSaleAttrValueList: SkuSaleAttrValueListModel = ???

const skuSaleAttrValueList: SkuSaleAttrValueListModel = [
  {
    id: 22,
    saleAttrId: 33,
    saleAttrName: 'string',
    saleAttrValueId: 44,
    saleAttrValueName: 'string',
    skuId: 55,
    spuId: 66,
  }
]

interface SkuModel {
  id: number;
  spuId: number;
  price: number;
  skuName: string;
  skuDesc: string;
  weight: number;
  tmId: number | undefined;
  category3Id: number;
  skuDefaultImg: string;
  isSale: boolean;
  skuImageList: SkuImageListModel;
  skuAttrValueList: SkuAttrValueListModel;
  skuSaleAttrValueList: SkuSaleAttrValueListModel;
}

type SkuListModel = SkuModel[];

interface GetSkuListResponseModel {
  records: SkuListModel;
  total: number;
}

// 难度2: 请完整定义以下数据
// const response: GetSkuListResponseModel = ???

const response: GetSkuListResponseModel = {
  records: [{
    id: 1,
    spuId: 1,
    price: 1,
    skuName: 'string',
    skuDesc: 'string',
    weight: 1,
    tmId: undefined,
    category3Id: 1,
    skuDefaultImg: 'string',
    isSale: true,
    skuImageList: [{
      id: 111,
      skuId: 222,
      imgName: "爱图",
      imgUrl: "http://www.baidu.com",
      isDefault: "atguigu.com",
    }],
    skuAttrValueList: [
      {
        id: 1,
        attrId: 2,
        valueId: 3,
        skuId: 4,
        attrName: "55",
        valueName: "66",
      },
    ],
    skuSaleAttrValueList: [
      {
        id: 22,
        saleAttrId: 33,
        saleAttrName: 'string',
        saleAttrValueId: 44,
        saleAttrValueName: 'string',
        skuId: 55,
        spuId: 66,
      }
    ],
  }],
  total: 1,
}
